const state = {
    imgUrl: null,
    getTabIndex: 1,
    showPermission: false,
    showChangeInfo: false,

    set_userinfos: [],

    pcShow: false,

    fileUrl: null
}

const mutations = {
    SET_IMGUrl: ( state, getUrl ) => {
        state.imgUrl = getUrl
    },
    CLEAR_IMG: ( state ) => {
        state.imgUrl = null
    },
    SET_TAB_INDEX: ( state, getIndex ) => {
        state.getTabIndex = getIndex
    },
    CLEAR_IMGUrl: ( state ) => {
        state.imgUrl = []
    },
    SET_PERSHOW: ( state, getValue ) => {
        state.showPermission = getValue
    },
    SET_PERMISSION_EMPTY: ( state ) => {
        state.showPermission = false
    },
    SET_USERINFO: ( state, getValue ) => {
        state.showChangeInfo = getValue
    },
    CLEAR_USERINFO: ( state ) => {
        state.showChangeInfo = false
    },
    SET_USERINFOS: ( state, getValue ) => {
        state.set_userinfos = getValue
    },
    SET_IMG: ( state, getValue ) => {
        state.imgUrl = getValue
    },
    SET_TRUE: ( state ) => {
        state.pcShow = true
    },
    SET_FALSE: ( state ) => {
        state.pcShow = false
    },

//  上传文件
    UPLOAD_FILE: ( state, value ) => {
        state.fileUrl = value
    },
    CLEAR_FILE: ( state ) => {
        state.fileUrl = null
    }

}

const action = {}

export default {
    namespaced: true,
    state,
    mutations,
    action
}

